package com.wyp168.renrenfilm.core.controller;


import com.wyp168.common.utils.R;
import com.wyp168.renrenfilm.core.feign.RenrenFastFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/film/user")
public class UserController {

    @Autowired
    RenrenFastFeign renrenFastFeign;
    
    /**
     * 根据token获取用户id
     */
    @GetMapping("/getUserInfo/{token}")
    public R getUserInfo(@PathVariable String token) {
        return R.ok(renrenFastFeign.info(token));
    }
}
